package com.lebang.feign.draw;

import com.lebang.model.RequestUserInfo;
import com.lebang.feign.draw.fallback.DrawWishFallback;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author xwj
 */
@FeignClient(name = "wangzhuan-draw", contextId = "wangzhuan-draw-wish", fallback = DrawWishFallback.class)
public interface DrawWishFeign {

    /**
     * 奖池列表--app
     *
     * @return 返回结果
     */
    @ApiOperation("奖池列表")
    @PostMapping("/draw/drawwishrecord/list")
    JsonData list(@RequestBody RequestUserInfo request);

    /**
     * 添加许愿记录--app
     *
     * @return 返回结果
     */
    @ApiOperation("添加许愿记录")
    @PostMapping("/draw/drawwishrecord/wish")
    JsonData wish(@RequestBody RequestUserInfo request,@RequestParam(value = "awardId", required = false) Integer awardId);

    /**
     * delete--app
     *
     * @return 返回结果
     */
    @ApiOperation("delete")
    @PostMapping("/draw/drawwishrecord/delete")
    JsonData delete(@RequestBody RequestUserInfo request, @RequestParam(value = "id", required = false) Integer id);

    /**
     * 轮播奖品--app
     *
     * @return 返回结果
     */
    @ApiOperation("banner")
    @PostMapping("/draw/drawwishrecord/banner")
    JsonData banner(@RequestBody RequestUserInfo userInfo);
}
